package problems;
import lib.MathLib;

public class Euler004 extends AbstractEuler {

	@Override
	public Number calculate() {
        int max = 0;
        for (int i = 999; i > 100; i--) {
            for (int j = 999; j > 100; j--) {
                int p = i * j;
                if (MathLib.isPalindromeInBase10(p) && p > max) max = p;
            }
        }
		return max;
	}

	@Override
	protected Number getCorrectAnswer() {
		return 906609;
	}

}